<template>
	<view class="table_wrap">
		<table class="table" border="0">
			<tr class="table_tr">
				<td class="table_title">省份</td>
				<td colspan="3">{{obj.returnList.provinceName}}</td>
			</tr>
			<tr>
				<td class="table_title">院校名称</td>
				<td colspan="3">{{obj.returnList.sname}}</td>
			</tr>
			<tr>
				<td class="table_title">专业组</td>
				<td colspan="3">{{obj.returnList.zyz}}</td>
			</tr>
			<tr>
				<td class="table_title">再选科目</td>
				<td colspan="3">{{obj.returnList.zxkm || "" }}</td>
			</tr>
			<tr>
				<td class="table_title">年份</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.year}}</td>
			</tr>
			<tr>
				<td class="table_title">分数线</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.gradeLine}}</td>
			</tr>
			<tr>
				<td class="table_title">录取最低分</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.minGrade}}</td>
			</tr>
			<!-- noKnown -->
			<tr>
				<td class="table_title">您的名次对应当年分数</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2" class="table_value_red">{{item2.seqGrade}}</td>
			</tr>
			<tr>
				<td class="table_title">录取平均分</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.avgGrade}}</td>
			</tr>
			<tr>
				<td class="table_title">最低分名次</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.minGradeSeq}}</td>
			</tr>
			<tr>
				<td class="table_title">您的名次</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2" class="table_value_red">{{item2.seq}}</td>
			</tr>
			<tr>
				<td class="table_title">平均分名次</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.avgGradeSeq}}</td>
			</tr>
			<tr>
				<td class="table_title">投档概率</td>	
				<!-- <td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.submitRate ? item2.submitRate + "%" : ""}}</td> -->
				<td colspan="3">{{obj.returnList.children[0].submitRate ? obj.returnList.children[0].submitRate + "%" : ""}}</td>
			</tr>
			<tr>
				<td class="table_title">计划招生数录取数</td>
				<td v-for="(item2,index2) in obj.returnList.children" :key="index2">{{item2.planSubmitAdmission}}</td>
			</tr>
			<tr>
				<td class="table_title">专业收藏</td>
				<td colspan="3">收藏</td>
			</tr>
		</table>
		<view style="padding: 20px 0;width: 100%;display: flex;flex-direction: row;justify-content: center;">
			<tn-button backgroundColor="#288BF0" fontColor="#288BF0" :plain="true" :border="true"
				width="30%" @click="goBatchInfo(obj)">
				<view style="display: flex;flex-direction: row;align-items: center;">
					<!-- <u-icon name="arrow-left" color="#288BF0"></u-icon> -->
					<view>专业详情</view>
				</view>
				</tn-button>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		props: {
			obj: {
				type: Object,
				default: {}
			},
		},
		data() {
			return {

			};
		},
		methods:{
			goBatchInfo(obj){
				this.$emit("batchInfo",obj)
			}
		}
	}
</script>

<style lang="less" scoped>
	.table_wrap {
		border: 1px solid rgba(0, 0, 0, 0.3);
		overflow: auto;
		width: 100%;

		.table {
			border-collapse: collapse;
			width: 100%;
			text-align: center;

			td {
				border: 1px solid rgba(0, 0, 0, 0.3);
			}
		}

		.table_title {
			padding: 10px;
			background-color: #288BF0;
			color: white;
			left: 0px;
			// position: sticky; // 表头还是靠粘性固定
			text-align: center;
			width: 30%;
		}
		
		.table_value_red {
			color: red;
		}
	}
</style>